docs(admin): add nginx tips for Unix socket proxy and HTTP/3 host detection#14991
Merged
Conversation
…ection Two new entries in the nginx Tips and tricks section: 1. Unix domain socket trusted proxy: when an upstream proxy (Caddy, HAProxy, another nginx) passes requests via a Unix socket, nginx sets REMOTE_ADDR to the literal string "unix:" which Nextcloud cannot parse as a trusted proxy IP. Document the set_real_ip_from unix: fix. 2. HTTP/3 untrusted domain error: nginx may not forward HTTP_HOST to PHP-FPM under HTTP/3 (QUIC), causing Nextcloud to reject the request. Document the fastcgi_param HTTP_HOST $host; fix. Fixes #12908 Relates to #12196 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Member
Author
|
Sources for the socket part https://help.nextcloud.com/t/trusted-proxy-on-unix-domain-socket/162670 |
Contributor
📖 Documentation Preview📄 1 changed documentation pageLast updated: Thu, 21 May 2026 11:07:42 GMT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☑️ Resolves
What and why
Two new entries added to the nginx "Tips and tricks" section:
1. Unix domain socket trusted proxy (#12908)
When an upstream proxy (Caddy, HAProxy, another nginx) passes requests to
Nextcloud's nginx via a Unix domain socket,
REMOTE_ADDRis set to theliteral string
unix:which Nextcloud cannot parse as a trusted proxy IP.This causes a crash (
Unsupported operand types: bool & string in IpAddress.php).Fix:
set_real_ip_from unix:;+real_ip_header X-Forwarded-For;in theserver block listening on the socket. Confirmed working by multiple users.
2. HTTP/3 "access through untrusted domain" (#12196)
Under HTTP/3 (QUIC), nginx may not forward
HTTP_HOSTto PHP-FPM, causingNextcloud to show the untrusted domain error even for correctly configured
trusted_domains.Fix: explicitly add
fastcgi_param HTTP_HOST $host;alongside the otherfastcgi_paramdirectives.🖼️ Screenshots
No visual/layout changes — prose and code block additions only.
✅ Checklist
codespellor similar and addressed any spelling issues